package com.example.homework2.service.impl;

import com.example.homework2.dao.StudentDao;
import com.example.homework2.entity.Student;
import com.example.homework2.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.UUID;

/**
 * @author yaojianfeng
 */
@Service("studentService")
public class StudentServiceImpl implements StudentService {
    @Resource(name = "studentDao")
    private StudentDao dao;


    @Override
    public int insert(Student student) {
        student.setSid(UUID.randomUUID().toString());

        return dao.insert(student);
    }

    @Override
    public int queryTotalCount() {
        return 0;
    }


}
